<%@ include file="/jsp/include.jsp"%>
<%
	PortletURL portletURL = renderResponse.createRenderURL();
	
	portletURL.setParameter("action", "viewAuthor");
	String portletURLString = portletURL.toString();
	
	AuthorSearch authorSearch  = new AuthorSearch(renderRequest, portletURL);
	AuthorDisplayTerms displayTerms = (AuthorDisplayTerms) authorSearch.getDisplayTerms();
%>
<liferay-util:include page="/jsp/author/toolbar.jsp" servletContext="<%= this.getServletContext() %>" />

<form action="<%= portletURLString%>" method="post" name="fm" onsubmit="submitForm(this); return false;">
<liferay-ui:search-container 
	searchContainer="<%= authorSearch %>"
	rowChecker="<%= new RowChecker(renderResponse) %>"
>
	<liferay-ui:search-form page="/jsp/author/search.jsp" servletContext="<%= this.getServletContext() %>"/>
	<liferay-ui:search-container-results 
		results="<%= AuthorLocalServiceUtil.searchAuthors( authorSearch) %>"
		total="<%= AuthorLocalServiceUtil.countAuthor( authorSearch) %>"
	/>
	<liferay-ui:search-container-row 
		className="com.sample.library.model.Author"
		escapedModel="<%= false %>"
		modelVar="author"
		stringKey="authorId"
	>
		<liferay-ui:search-container-column-text
			name='Full name'
			orderable="<%= false %>"
			value='<%= author.getLastName() + " " + author.getFirstMiddleName()%>'
		/>
		
		<liferay-ui:search-container-column-text
			name='Email'
			orderable="<%= false %>"
			value='<%= author.getEmail()%>'
		/>
	</liferay-ui:search-container-row>
	<liferay-ui:search-iterator searchContainer="<%= authorSearch %>"/>
</liferay-ui:search-container>
</form>